home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
qbtools1.arc
/
AEDIALOG.BAS
< prev
next >
Wrap
BASIC Source File
|
1987-12-10
|
2KB
|
75 lines
rem $linesize:132
rem $title:'Application Engineer Standard Routines'
rem $subtitle:'Two question dialog box. Can be used for single.'
' Include the COMMON values
rem $include:'AESHARED.BAS'
sub Dialog.Two(st1$,ls1%,st2$,ls2%) static
ae.sstack%=ae.sstack%+1000% ' Screen save stack
if ae.sstack%>10000% then
call ae.error("AEDT Screen Stack Overflow"+str$(ae.sstack%))
end if
attr%=( ae.bg%(2%) and 7%)*16% + ae.fg%(2%)
d%=ls1%
if d%>ls2% then
d%=ls2%
end if
for j%=1% to 4%
k%=len(dialog$(j%))
if k%>d% then d%=k%
next j%
w%=d%+6%
l.marg%=(80%-w%)/2%
t.marg%=7%
r.marg%=l.marg%+w%-1%
b.marg%=18%
t.frame$=chr$(214%)+string$((w%-2%),196%)+chr$(183%)
b.frame$=chr$(211%)+string$((w%-2%),196%)+chr$(189%)
horz$=chr$(186%)+string$((w%-2%),32%)+chr$(186%)
call getscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%,b.marg%,r.marg%,0%,0%)
call xqprint(t.frame$,t.marg%,l.marg%,attr%,0%)
call xqprint(b.frame$,b.marg%,l.marg%,attr%,0%)
for j%=t.marg%+1% to b.marg%-1%
call xqprint(horz$,j%,l.marg%,attr%,0%)
next j%
l.marg%=l.marg%+4%
call xqprint(dialog$(1),t.marg%+1%,l.marg%,attr%,0%)
call xqprint(dialog$(2),t.marg%+5%,l.marg%,attr%,0%)
call xqprint(dialog$(3),t.marg%+9%,l.marg%,attr%,0%)
call xqprint(dialog$(4),t.marg%+10%,l.marg%,attr%,0%)
ipy1%=t.marg%+3%
ipy2%=t.marg%+7%
if ls1% then
call I.Block.Frame(ipy1%,l.marg%,1%,ls1%,1%)
end if
if ls2% then
call I.Block.Frame(ipy2%,l.marg%,1%,ls2%,1%)
end if
if ls1% then
call Input.Block(ipy1%,l.marg%,1%,ls1%,st1$,0%)
end if
if ls2% then
call Input.Block(ipy2%,l.marg%,1%,ls2%,st2$,0%)
end if
call putscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%-4%,b.marg%,r.marg%,0%,0%)
locate ,,0
ae.sstack%=ae.sstack%-1000%
end sub